package com.qf.smartplatform.mapper;

import com.qf.smartplatform.pojo.Category;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Locale;

/**
 * projectName:day12_27_Test
 * author:guoLei
 * time:2021/12/29 17:35
 * description:
 */
public interface CategoryMapper {
    void addCategory(Category category);

    int updateCategory(Category category);

    Category selectById(Long cId);

    Category selectByName(String cName);

    List<Category> selectAllCategories();

    @Select("SELECT * FROM sys_category WHERE status=1")
    List<Category> selectAllEnableCategories();

    List<Category> selectCategoriesByNameLike(String cName);

    int deleteCategoriesByIds(@Param("ids") List<Long> ids);

}
